package com.ucode.model.cgms.form;

import com.ucode.tool.base.enums.CommonSwitchStatusEnum;
import com.ucode.tool.validator.InEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.*;
import java.math.BigDecimal;

/**
 * 礼物配置Form
 * @Author: liliang
 * @Date: 2025/5/11 13:54
 * @Version: 1.0
 */
@Schema(description = "陪玩俱乐部社区系统 - 礼物配置Form")
@Data
@EqualsAndHashCode
@ToString(callSuper = true)
public class CgmsGiftForm {

    /**
     * 礼物名称
     */
    @Schema(description = "礼物名称", example = "大鸡腿", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "礼物名称不能为空")
    @Size(max = 50, message = "礼物名称不能超过50个字符")
    private String name;
    /**
     * 礼物图标
     */
    @Schema(description = "礼物图标", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "礼物图标不能为空")
    @Size(max = 255, message = "礼物图标不能超过 255 个字符")
    private String icon;
    /**
     * 礼物Gif动图
     */
    @Schema(description = "礼物Gif动图", requiredMode = Schema.RequiredMode.AUTO)
    @Size(max = 255, message = "礼物图标不能超过 255 个字符")
    private String gifUrl;
    /**
     * 礼物音频
     */
    @Schema(description = "礼物音频", requiredMode = Schema.RequiredMode.AUTO)
    @Size(max = 255, message = "礼物音频不能超过 255 个字符")
    private String musicUrl;
    /**
     * 礼物状态
     */
    @Schema(description = "礼物状态，参考枚举CommonSwitchStatusEnum", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "礼物状态不能为空")
    @InEnum(value= CommonSwitchStatusEnum.class)
    private Integer status;
    /**
     * 价格,单位:元
     */
    @Schema(description = "价格金额（单位：元）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "价格金额不能为空")
    @DecimalMin(value = "0",message = "价格金额最小值为 0")
    @Digits(integer = 10,fraction = 2,message = "价格金额格式不正确")
    private BigDecimal price;

}
